import { createRouter, createWebHashHistory } from 'vue-router'
import LayoutMain from '@/components/layout/LayoutMain.vue'

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Root',
      redirect: '/home-view',
      component: LayoutMain,
      children: [
        {
          path: '/home-view',
          name: 'home-view',
          component: () => import('@/views/home-view/HomeView.vue'),
          children: [
            {
              path: '/home-view-default',
              name: 'home-view-default',
              component: () => import('@/views/home-view/HomeViewDefault.vue'),
            },
          ],
        },
        {
          path: '/about-view',
          name: 'about-view',
          component: () => import('@/views/about-view/AboutView.vue'),
        },
      ],
    },
  ],
})

export default router
